home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 1.iso / toolbox / src / tutorials / custEducation / opengl2 / demos / Makefile < prev    next >
Encoding:
Makefile  |  1996-11-11  |  2.3 KB  |  89 lines

  1. #!smake
  2. #
  3. # Copyright 1994, Silicon Graphics, Inc.
  4. #  All Rights Reserved.
  5. #
  6. # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  7. # the contents of this file may not be disclosed to third parties, copied or
  8. # duplicated in any form, in whole or in part, without the prior written
  9. # permission of Silicon Graphics, Inc.
  10. #
  11. # RESTRICTED RIGHTS LEGEND:
  12. # Use, duplication or disclosure by the Government is subject to restrictions
  13. # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  14. # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  15. # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  16. # rights reserved under the Copyright Laws of the United States.
  17. #
  18. #
  19. # Makefile for OpenGL Programming 2 additional demos.
  20. #
  21. #    "$Revision: 1.2 $"
  22.  
  23. include    $(ROOT)/usr/include/make/commondefs
  24.  
  25. .SUFFIXES:
  26. .SUFFIXES: .c .o .so .h
  27. #
  28. # Targets with made via a common rule
  29. #
  30. EASYTARGETS= abgr blendCollage earth panZoom subtexture oversphere \
  31.         multiwin RGBAandCI 
  32.  
  33. #
  34. # Targets with explicit rules
  35. #
  36. TARGETS=oglextensions pixmap glwstereo surfgrid lens
  37.  
  38. ALLTARGETS=$(EASYTARGETS) $(TARGETS)
  39.  
  40. OPENGL2 ?= ..
  41.  
  42. LLDOPTS = -L${OPENGL2}/lib 
  43. LLDLIBS = -loglprog -limage -lglut -lGLU -lGL -lXmu -lX11 -lm
  44.  
  45. LCINCS = -I. -I${OPENGL2}/include
  46. LCOPTS=-float -prototypes -xansi -fullwarn $(OPTIMIZER)\
  47.      $(LCINCS) -I/usr/include -MDupdate Makedepend
  48. XLIBS= -lX11 
  49. XEXTLIBS= -lXext -lX11
  50. XMLIBS= -lGLw -lXm -lXt
  51. GLLIBS= -lGLU -lGL
  52. LDFLAGS= $(LLDOPTS) -L/lib -L/usr/lib
  53. LOCALLIBS= util.o
  54. CCF=$(CC) $(LCOPTS)
  55.  
  56. #if defined(DEBUG)
  57. OPTIMIZER = -g
  58. #else
  59. OPTIMIZER = -O
  60. #endif
  61.  
  62. # don't bother generating intermediate files
  63. LMKDEPFLAGS= $(NULLSUFFIX_MKDEPFLAG)
  64.  
  65. all default: $(ALLTARGETS)
  66.  
  67. $(EASYTARGETS): $$@.o $(LOCALLIBS)
  68.     $(CCF) -o $@ $@.o $(LOCALLIBS) $(LDFLAGS) $(LLDLIBS)
  69.  
  70. oglextensions pixmap surfgrid: $$@.o $(LOCALLIBS)
  71.     $(CCF) -o $@ $@.o $(LOCALLIBS) $(LDFLAGS) $(XMLIBS) $(GLLIBS) $(XLIBS) -lm
  72.  
  73. lens: $$@.o $(LOCALLIBS) xwindow.o
  74.     $(CCF) -o $@ $@.o $(LOCALLIBS) xwindow.o $(LDFLAGS) $(GLLIBS) $(XLIBS) -limage -lm
  75.  
  76. glwstereo: $$@.o $(LOCALLIBS)
  77.     $(CCF) -o $@ $@.o $(LOCALLIBS) $(LDFLAGS) $(XMLIBS) $(GLLIBS) $(XEXTLIBS) -lm
  78.  
  79. .c.o:
  80.     $(CCF) -c $<
  81.  
  82. clean:
  83.     /bin/rm -f *.o a.out core
  84.  
  85. clobber: clean
  86.     /bin/rm -f $(ALLTARGETS) Makedepend
  87.  
  88. sinclude Makedepend
  89.